package com.huang.auth.converter;

import com.huang.auth.entity.po.AuthRolePO;
import com.huang.auth.entity.vo.AuthRoleVO;
import com.huang.base.core.BaseConvertor;
import org.springframework.stereotype.Component;

/**
 * @Author HuangShen
 * @Date 2022/1/29 21:06
 * @Describe AuthRoleVO 准换器
 */
@Component
public class AuthRoleVOConverter extends BaseConvertor<AuthRolePO, AuthRoleVO> {
    @Override
    public AuthRoleVO doConvert(AuthRolePO m) {
        AuthRoleVO authRoleVO = new AuthRoleVO();
        authRoleVO.setCode(m.getCode());
        authRoleVO.setId(m.getId().toString());
        authRoleVO.setDescribe(m.getDescribe());
        authRoleVO.setName(m.getName());
        authRoleVO.setStatus(m.getStatus());
        authRoleVO.setType(m.getType());
        return authRoleVO;
    }
}
